package com.wy.client;

import com.wy.config.FeignConfig;
import com.wy.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: wy
 * @Date:2019/11/1 14:32
 */
@FeignClient(value = "user-service",fallback = UserClientRollBack.class,configuration = FeignConfig.class)
public interface UserClient {
    //相当于RestTemplate 调用URL
    @GetMapping("/user/{id}")
    User getUserById(@PathVariable Long id);
}
